﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using Common.Utilities.Dispatcher;

namespace Workflows.Components.TextMining.Collapse
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class FuzzyGroupingOutput:ResultBase
    {
        #region props
        private Dictionary<int,int> _InstanceIdCollapseIdMappings;
        /// <summary></summary>
        public Dictionary<int,int> InstanceIdCollapseIdMappings
        {
            get
            {
                return this._InstanceIdCollapseIdMappings;
            }
            set
            {
                this._InstanceIdCollapseIdMappings = value;
            }
        }

        private Dictionary<int,double> _InstanceIdSimilarityScoreMappings;
        /// <summary></summary>
        public Dictionary<int,double> InstanceIdSimilarityScoreMappings
        {
            get
            {
                return this._InstanceIdSimilarityScoreMappings;
            }
            set
            {
                this._InstanceIdSimilarityScoreMappings = value;
            }
        }

        private int _CountAfterCollapse;
        /// <summary></summary>
        public int CountAfterCollapse
        {
            get
            {
                return this._CountAfterCollapse;
            }
            set
            {
                this._CountAfterCollapse = value;
            }
        }
        #endregion

        #region ctor
        /// <summary>
        /// 
        /// </summary>
        public FuzzyGroupingOutput():base(Guid.Empty,Guid.Empty)
        {
            this._InstanceIdSimilarityScoreMappings=new Dictionary<int, double>();
            this._InstanceIdCollapseIdMappings=new Dictionary<int, int>();
            this._CountAfterCollapse = 0;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="componentID"></param>
        /// <param name="jobTicketID"></param>
        /// <param name="instanceIDCollapseIDs"></param>
        /// <param name="instanceIDScore"></param>
        /// <param name="countAfterCollapse"></param>
        public FuzzyGroupingOutput(Guid componentID, Guid jobTicketID,
            Dictionary<int,int> instanceIDCollapseIDs,
            Dictionary<int,double> instanceIDScore,
            int countAfterCollapse) 
            : base(componentID, jobTicketID)
        {
            this._InstanceIdSimilarityScoreMappings = instanceIDScore;
            this._InstanceIdCollapseIdMappings = instanceIDCollapseIDs;
            this._CountAfterCollapse = countAfterCollapse;
        }
        #endregion

        public override ResultBase Instantiate(XmlNode xNode)
        {
            throw new NotImplementedException();
        }

        public override XmlNode Serialize(ref XmlDocument xDoc, ref XmlNode parentNode)
        {
            throw new NotImplementedException();
        }
    }
}
